<?php

namespace App\Exceptions;


class BaseException extends \Exception
{
    public $code = 400;

    public $msg = 'Forbidden';

    public $errCode = 403;


    public function __construct($arr = [])
    {
        if(array_key_exists('code',$arr)){
            $this->code = (int)$arr['code'];
        }

        if(array_key_exists('msg',$arr)){
            $this->msg = $arr['msg'];
        }

        if(array_key_exists("errCode",$arr)){
            $this->errCode = (int)$arr["errCode"];
        }
    }
}
